package com.springcloud.server;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.ComponentScan;

/**
 * 服务端
 *
 */
@EnableEurekaClient
@SpringBootApplication
@ComponentScan(basePackages = {"org.apache.rocketmq.spring.starter","com.springcloud.server"})
public class ServerApp extends SpringBootServletInitializer{
	/**
	 * 打包需继承SpringBootServletInitializer类，复写这个方法即可
	 */  
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(ServerApp.class);
	}


	
	public static void main(String[] args) {
		SpringApplication.run(ServerApp.class, args);
	}
}
